<?php

namespace SisGG\FinalBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class PedidoDeliveryType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('hora')
            ->add('fecha')
            ->add('precio')
            ->add('itemPedido',new ItemPedidoType())
            ->add('cliente')
            ->add('direccion',new DireccionType())
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'SisGG\FinalBundle\Entity\PedidoDelivery'
        ));
    }

    public function getName()
    {
        return 'sisgg_finalbundle_pedidodeliverytype';
    }
}
